import { createRouter, createWebHistory } from 'vue-router';
import Login from '@/components/Login.vue';
import Home from '@/components/Home.vue';
import DietRecords from '@/components/DietRecords.vue';
import ExerciseRecords from '@/components/ExerciseRecords.vue';
import ExerciseSuggestions from '@/components/ExerciseSuggestions.vue';
import DietPlans from '@/components/DietPlans.vue';
const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/login',
      name: 'Login',
      component: Login,
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
    },
    {
      path: '/home/diet-records',
      name: 'DietRecords',
      component: DietRecords,
    },
    {
      path: '/home/exercise-records',
      name: 'ExerciseRecords',
      component: ExerciseRecords,
    },
    {
      path: '/home/exercise-suggestions',
      name: 'ExerciseSuggestions',
      component: ExerciseSuggestions,
    },
    {
      path: '/home/diet-plans',
      name: 'DietPlans',
      component: DietPlans,
    },
    {
      path: '/',
      redirect: '/login',
    },
    {
      path: '/:pathMatch(.*)*',
      redirect: '/login',
    },
  ],
});

export default router;